fix interaction between translation and lights. (#390)
authortsteven4 <13596209+tsteven4@users.noreply.github.com>
Thu, 8 Aug 2019 13:39:37 +0000 (07:39 -0600)
committerGitHub <noreply@github.com>
Thu, 8 Aug 2019 13:39:37 +0000 (07:39 -0600)
When using a language other than English the initial painting of
the gui mainwindow showed the placeholder text for the labels next
to the waypoints, routes and tracks check boxes instead of the
lights.  This was issue #389.

gui/app.qrc
gui/images/lights.png [new file with mode: 0644]
gui/mainwindow.cc
gui/mainwinui.ui

index 947aea0f4929858e69f2db99de02712c69e58eab..9e7b01996ee0a76a8b6e29354585c526567a0352 100644 (file)
@@ -4,6 +4,7 @@
      <file>images/01.png</file>
      <file>images/10.png</file>
      <file>images/11.png</file>
+     <file>images/lights.png</file>
      <file>images/open.png</file>
      <file>images/save.png</file>
      <file>images/runit.png</file>
diff --git a/gui/images/lights.png b/gui/images/lights.png
new file mode 100644 (file)
index 0000000..8dc9fb2
Binary files /dev/null and b/gui/images/lights.png differ
index df5d5e50d4e4855e44bca63b8586c32bccb4dd7b..80a6bbc624bf77a7550df1899e9e3f68727faaaa 100644 (file)
@@ -212,9 +212,6 @@ MainWindow::MainWindow(QWidget* parent): QMainWindow(parent)
 #else
   setAcceptDrops(true);
 #endif
-  ui_.wayPtLabel->setText("");
-  ui_.trackLabel->setText("");
-  ui_.routeLabel->setText("");
   lights_[0] = QPixmap::fromImage(QImage(":images/00.png").scaledToHeight(20, Qt::SmoothTransformation));
   lights_[1] = QPixmap::fromImage(QImage(":images/01.png").scaledToHeight(20, Qt::SmoothTransformation));
   lights_[2] = QPixmap::fromImage(QImage(":images/10.png").scaledToHeight(20, Qt::SmoothTransformation));
index fdac6bda48cbe807e9276acd8d583a3193d7508e..f5765e104d997973a3bc802596e66d3a2b249593 100644 (file)
          </property>
          <widget class="QWidget" name="inputFilePage">
           <layout class="QHBoxLayout" name="horizontalLayout_4">
-           <property name="margin">
+           <property name="leftMargin">
+            <number>0</number>
+           </property>
+           <property name="topMargin">
+            <number>0</number>
+           </property>
+           <property name="rightMargin">
+            <number>0</number>
+           </property>
+           <property name="bottomMargin">
             <number>0</number>
            </property>
            <item>
          </widget>
          <widget class="QWidget" name="inputDevicePage">
           <layout class="QVBoxLayout" name="verticalLayout_2">
-           <property name="margin">
+           <property name="leftMargin">
+            <number>0</number>
+           </property>
+           <property name="topMargin">
+            <number>0</number>
+           </property>
+           <property name="rightMargin">
+            <number>0</number>
+           </property>
+           <property name="bottomMargin">
             <number>0</number>
            </property>
            <item>
        <string>Translation Options</string>
       </property>
       <layout class="QHBoxLayout" name="horizontalLayout_7">
-       <property name="margin">
+       <property name="leftMargin">
+        <number>4</number>
+       </property>
+       <property name="topMargin">
+        <number>4</number>
+       </property>
+       <property name="rightMargin">
+        <number>4</number>
+       </property>
+       <property name="bottomMargin">
         <number>4</number>
        </property>
        <item>
         <widget class="QLabel" name="wayPtLabel">
          <property name="text">
-          <string>-</string>
+          <string/>
+         </property>
+         <property name="pixmap">
+          <pixmap resource="app.qrc">:/images/lights.png</pixmap>
          </property>
          <property name="scaledContents">
           <bool>false</bool>
        <item>
         <widget class="QLabel" name="routeLabel">
          <property name="text">
-          <string>-</string>
+          <string/>
+         </property>
+         <property name="pixmap">
+          <pixmap resource="app.qrc">:/images/lights.png</pixmap>
          </property>
         </widget>
        </item>
        <item>
         <widget class="QLabel" name="trackLabel">
          <property name="text">
-          <string>-</string>
+          <string/>
+         </property>
+         <property name="pixmap">
+          <pixmap resource="app.qrc">:/images/lights.png</pixmap>
          </property>
         </widget>
        </item>
          </property>
          <widget class="QWidget" name="outputFilePage">
           <layout class="QHBoxLayout" name="horizontalLayout_9">
-           <property name="margin">
+           <property name="leftMargin">
+            <number>0</number>
+           </property>
+           <property name="topMargin">
+            <number>0</number>
+           </property>
+           <property name="rightMargin">
+            <number>0</number>
+           </property>
+           <property name="bottomMargin">
             <number>0</number>
            </property>
            <item>
          </widget>
          <widget class="QWidget" name="outputDevicePage">
           <layout class="QVBoxLayout" name="verticalLayout_4">
-           <property name="margin">
+           <property name="leftMargin">
+            <number>0</number>
+           </property>
+           <property name="topMargin">
+            <number>0</number>
+           </property>
+           <property name="rightMargin">
+            <number>0</number>
+           </property>
+           <property name="bottomMargin">
             <number>0</number>
            </property>
            <item>
      <x>0</x>
      <y>0</y>
      <width>675</width>
-     <height>22</height>
+     <height>26</height>
     </rect>
    </property>
    <widget class="QMenu" name="menuFile">